package com.jindun.paper.ui.bag;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

import com.jindun.paper.ui.bag.bean.BagOrderItemInputBean;

public class NewPaperTypeWizard extends Wizard implements INewWizard {

	private BagOrderItemInputBean inputBean = null;
	
	private boolean enabled;

	public NewPaperTypeWizard( BagOrderItemInputBean inputBean, boolean enabled) {
		this.inputBean = inputBean;
		this.enabled = enabled;
		
	}
	
	

	public boolean isEnabled() {
		return enabled;
	}



	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}



	@Override
	public void init(IWorkbench workbench, IStructuredSelection selection) {
	}

	@Override
	public void addPages() {
		PaperTypeInputWizardPage firstStep = new PaperTypeInputWizardPage(inputBean, enabled);
		addPage(firstStep);
		
	}

	@Override
	public boolean performFinish() {
		return this.getPages()[0].isPageComplete();
	}


	@Override
	public boolean needsProgressMonitor() {
		return true;
	}

	@Override
	public boolean needsPreviousAndNextButtons() {
		return false;
	}
	
	

	
}
